<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>注册</title>
		<link href="__TPL__/style/css/web.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="__TPL__/style/js/jquery.min.js"></script>
<script language="javascript">
	function get_mobile_code(){
        $.post('{url('sms/send')}', {mobile:jQuery.trim($('#mobile').val()),send_code: {$_SESSION['send_code']}}, function(msg) {
            alert(jQuery.trim(unescape(msg)));
			if(msg=='提交成功'){
				RemainTime();
			}
        });
	}
	var iTime = 59;
	var Account;
	function RemainTime(){
		document.getElementById('zphone').disabled = true;
		var iSecond,sSecond="",sTime="";
		if (iTime >= 0){
			iSecond = parseInt(iTime%60);
			iMinute = parseInt(iTime/60)
			if (iSecond >= 0){
				if(iMinute>0){
					sSecond = iMinute + "分" + iSecond + "秒";
				}else{
					sSecond = iSecond + "秒";
				}
			}
			sTime=sSecond;
			if(iTime==0){
				clearTimeout(Account);
				sTime='获取手机验证码';
				iTime = 59;
				document.getElementById('zphone').disabled = false;
			}else{
				Account = setTimeout("RemainTime()",1000);
				iTime=iTime-1;
			}
		}else{
			sTime='没有倒计时';
		}
		document.getElementById('zphone').value = sTime;
	}	
	//同意协议验证
	function check(){		
		if($("#agree").prop('checked')==true){
			$('#form1').submit();
		}else{
			alert('已经认真阅读并同意《会员服务手册》，才可注册');
			return false;
		}
	}
</script>
	</head>

	<body>
		<div id="content">
			{include common/header}
			<div class="content">
				<div class="reserve_info">
					<ul class="bd_bottom"><strong>用户注册</strong>
					</ul>
					<form id="form1" name="form1" method="post" action="{url('login/do_register')}" onsubmit="return check()">
						<table width="737" height="426" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="68">姓名</td>
								<td width="669">
									<input name="Name" type="text" class="lg_text" /><span class="red">*</span>
								</td>
							</tr>

							<tr>
								<td>手机</td>
								<td>
									<input name="Mobile" id="mobile" type="text" class="lg_text" /><span class="red">*</span>
									<input id="zphone" type="button"  value=" 获取手机验证码 " onClick="get_mobile_code();">
								</td>
							</tr>
							<tr>
								<tr>
									<td>验证码</td>
									<td>
										<input type="text" size="8" name="mobile_code" class="lg_text" /><span class="red">*</span>
									</td>
								</tr>

								
								<tr>
									<td>密码</td>
									<td>
										<input name="PassWord" type="password" class="lg_text" /><span class="red">*</span>
									</td>
								</tr>
								<tr>
									<td>密码确认</td>
									<td>
										<input name="PassWord2" type="password" class="lg_text" /><span class="red">*</span>
									</td>
								</tr>

                                   <tr>
                <td width="68">性别</td>
             <td width="669">
               <label>
                 <select name="select" id="select" >
                   <option value="0">男</option>
                   <option value="1">女</option>
                 </select>
               </label>
            
             </td>
             </tr>
              <tr>
                <td>身份证</td>
                <td><input name="" type="text" class="lg_text" /> </td>
              </tr>
             
                <td>邮箱</td>
                <td><input name="" type="text" class="lg_text" /> </td>
              </tr>
								<tr>
									<td height="38">&nbsp;</td>
									<td>
										<input  id="agree" type="checkbox" value="1" />已经认真阅读并同意<a href="">《会员服务手册》</a>
									</td>
								</tr>
								<tr>
									<td>&nbsp;</td>
									<td>
										<input name="" type="submit" class="lg_btn" value="立即注册" />
									</td>
								</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
        {include common/foot}
	</body>

</html>
